load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/ledger_suite/icp:icp_ledger",
    "//rs/ledger_suite/icrc1/test_utils",
    "//rs/rosetta-api/common/rosetta_core:rosetta-core",
    "//rs/rosetta-api/icp:ic-rosetta-api",
    "//rs/rosetta-api/icp:rosetta-api",
    "//rs/types/types",
    "@crate_index//:base64",
    "@crate_index//:hex",
    "@crate_index//:nix",
    "@crate_index//:rand",
    "@crate_index//:reqwest",
    "@crate_index//:serde",
    "@crate_index//:serde_json",
    "@crate_index//:slog",
    "@crate_index//:tempfile",
    "@crate_index//:tokio",
    "@crate_index//:url",
]

MACRO_DEPENDENCIES = []

DEV_DEPENDENCIES = []

MACRO_DEV_DEPENDENCIES = []

ALIASES = {
}

rust_library(
    name = "test_utils",
    testonly = True,
    srcs = glob(["src/**"]),
    aliases = ALIASES,
    crate_name = "ic_rosetta_test_utils",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.9.0",
    deps = DEPENDENCIES,
)

rust_test(
    name = "test_utils_test",
    aliases = ALIASES,
    crate = ":test_utils",
    proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
    deps = DEPENDENCIES + DEV_DEPENDENCIES,
)
